<?php

namespace app\admin\controller;
use think\Controller;
use think\Db;

class Cate extends Controller {

	public function user() {

		return view();
	}

	public function lst() {

		$cates = Db::name('uoc')->select();

		$this->assign('cates', $cates);
		return $this->fetch();
	}
	public function cancel() {
		$id = input('post.id');
		Db::name('order')->where('id', $id)->setField('status', '-1');
		echo json_encode(["status" => 100]);
	}
	public function finish() {
		$id = input('post.id');
		Db::name('order')->where('id', $id)->setField('status', '1');
		echo json_encode(["status" => 100]);
	}

}
